<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" href="./szj.css">
    <title>十字架</title>
</head>

<body>
    <!--第一种-->
    <p class="title-of-ways">十字架实现的第一种方式</p>
    <p class="subtitle-of-ways">使用inline-block + text-align方式</p>
    <div class="outer-box">
        <div style="text-align: center;margin-bottom: 4px;">
            <div class="top-box"></div>
        </div>

        <div style="text-align: center;">
            <div class="middle-three-box" style="display: inline-block;height: 100px;width: 328px;">
                <div class="left-box"></div>
                <div class="center-box"></div>
                <div class="right-box"></div>
            </div>
        </div>

        <div style="text-align: center;margin-top: 4px;">
            <div class="bottom-box"></div>
        </div>
    </div>
    <hr>

    <!--第二种-->
    <p class="title-of-ways">十字架实现的第二种方式</p>
    <p class="subtitle-of-ways">使用position定位-relation方式</p>
    <div class="outer-box">
        <div class="position-box">
            <div class="top-box" style="float: left; position: relative; left: 200px"></div>
            <div class="left-box" style="float: left; position: relative; top: 105px; right: 5px;"></div>
            <div class="center-box" style="float: left; position: relative; top: 105px;"></div>
            <div class="right-box" style="float: left; position: relative; top: 105px; left: 5px;"></div>
            <div class="bottom-box" style="float: left; position: relative; right: 200px; top: 210px;"></div>
        </div>
    </div>
    <hr>

    <!--第三种-->
    <p class="title-of-ways">十字架实现的第三种方式</p>
    <p class="subtitle-of-ways">使用position定位-absolute方式</p>
    <div class="outer-box">
        <div class="position-box" style="position: relative;">
            <div class="top-box" style="float: left;position: absolute;left: 200px;"></div>
            <div class="left-box" style="float: left; position: absolute; top: 105px; left: 95px;"></div>
            <div class="center-box" style="float: left; position: absolute; top: 105px; left: 200px;"></div>
            <div class="right-box" style="float: left; position: absolute; top: 105px; left: 305px;"></div>
            <div class="bottom-box" style="float: left; position: absolute; top: 210px; left: 200px"></div>
        </div>
    </div>
    <hr>

    <!--第四种(少用)-->
    <p class="title-of-ways">十字架实现的第四种方式</p>
    <p class="subtitle-of-ways">使用伸缩盒-Flexible Box(旧)方式</p>
    <div class="outer-box" style="display: -webkit-box; -webkit-box-pack:center; -webkit-box-align:center;">
        <div class="flexible-box">
            <div style="display: -webkit-box; -webkit-box-pack:center; -webkit-box-align:center; margin-bottom:4px;">
                <div class="top-box"></div>
            </div>
            <div style="display: -webkit-box; -webkit-box-pack:center; -webkit-box-align:center;">
                <div class="left-box"></div>
                <div class="center-box"></div>
                <div class="right-box"></div>
            </div>
            <div style="display: -webkit-box; -webkit-box-pack:center; -webkit-box-align:center; margin-top:4px;">
                <div class="bottom-box"></div>
            </div>
        </div>
    </div>
    <hr>

    <!--第五种-->
    <p class="title-of-ways">十字架实现的第五种方式</p>
    <p class="subtitle-of-ways">使用伸缩盒-Flexible Box(新)方式</p>
    <div class="outer-box" style="display: -webkit-flex; align-items: center; justify-content: center;">
        <div class="flexible-box">
            <div style="display: -webkit-flex;align-items: center;justify-content: center; margin-bottom: 8px;">
                <div class="top-box"></div>
            </div>
            <div style="display: -webkit-flex;align-items: center;justify-content: center;">
                <div class="left-box" style="margin-right: 8px;"></div>
                <div class="center-box"></div>
                <div class="right-box" style="margin-left: 8px;"></div>
            </div>
            <div style="display: -webkit-flex; align-items: center;justify-content: center; margin-top: 8px;">
                <div class="bottom-box"></div>
            </div>
        </div>
    </div>
    <hr>

    <!--第六种-->
    <p class="title-of-ways">十字架实现的第六种方式</p>
    <p class="subtitle-of-ways">使用table分格子方式</p>
    <div class="outer-box">
        <table style="margin-left: auto;margin-right: auto">
            <tbody>
                <tr>
                    <td>
                        <div style="height: 100px;width: 100px;"></div>
                    </td>
                    <td>
                        <div class="top-box"></div>
                    </td>
                    <td>
                        <div style="height: 100px;width: 100px;"></div>
                    </td>
                </tr>
                <tr>
                    <td>
                        <div class="left-box" style="margin-right: 3px;"></div>
                    </td>
                    <td>
                        <div class="center-box"></div>
                    </td>
                    <td>
                        <div class="right-box" style="margin-left: 3px;"></div>
                    </td>
                </tr>
                <tr>
                    <td>
                        <div style="height: 100px;width: 100px;"></div>
                    </td>
                    <td>
                        <div class="bottom-box"></div>
                    </td>
                    <td>
                        <div style="height: 100px;width: 100px;"></div>
                    </td>
                </tr>
            </tbody>
        </table>
    </div>
    <hr>
</body>

</html>